package com.micro.ai.files.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 文件标签实体类
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@TableName("file_tags")
@Schema(description = "文件标签信息")
public class FileTag implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "标签ID", example = "tag_123456789")
    private String id;

    /**
     * 租户ID
     */
    @Schema(description = "租户ID", example = "tenant_001")
    private String tenantId;

    /**
     * 标签名称
     */
    @Schema(description = "标签名称", example = "重要")
    private String tagName;

    /**
     * 标签颜色
     */
    @Schema(description = "标签颜色", example = "#1890ff")
    private String tagColor;

    /**
     * 创建人ID
     */
    @Schema(description = "创建人ID", example = "user_001")
    private String createdBy;

    /**
     * 使用次数
     */
    @Schema(description = "使用次数", example = "10")
    private Integer usageCount;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间", example = "2025-01-01 00:00:00")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间", example = "2025-01-01 00:00:00")
    private LocalDateTime updatedAt;
}

